
import AnnoceComp  from './AnnoceComp'
import CarouselComp from './CarouselComp'
import PersonInfo from './PersonInfo'




export default class BannerHeader extends React.Component{
    constructor(props) {
        super(props);
        this.state = {

        }
    }

    componentDidMount() {

    }

    render(){

        return(
            <div className={'banner-header-root-wrapper'}>
                <div style={{display:'flex', width:1200,position:'relative'}}>
                    <CarouselComp
                    />
                    {this.renderRightSection()}
                </div>
            </div>
        )
    }


    renderRightSection(){
        if(global.hasLogin){

            // let premission=localStorage.getItem("STORE_USERPERMISSION")
            // if(premission&&premission.indexOf('订单查看')==-1){
            //     return(
            //         <div className={'banner-header-right-box'}>
            //             <AnnoceComp
            //                 number={11}
            //             />
            //         </div>
            //         )
            // }
            return(
                <div className={'banner-header-right-box'}>
                    <PersonInfo />
                    <div style={{height:10,backgroundColor:'rgba(240,245,248,1)'}}/>
                    <AnnoceComp
                    />
                </div>
            )
        }
        else{
            return (
                <div className={'banner-header-right-box'}>
                    <AnnoceComp
                    />
                </div>
            )
        }

    }
}